package org.simplecrm.domain.event.eventtype;

import java.io.Serializable;

/**
 * Event type options.
 */
public class EventType implements Serializable {

    private Integer id;
    private String name;

    public EventType() {
    }

    public EventType(String name) {
        this.name = name;
    }

    public EventType(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof EventType)) {
            return false;
        }

        EventType eventType = (EventType) o;

        if (!id.equals(eventType.id)) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        return id.hashCode();
    }

    @Override
    public String toString() {
        return "EventType{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
